<%-- 
    Document   : MergeBody
    Created on : 28/04/2011, 05:12:53 م
    Author     : Mostafa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib  prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@taglib  prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@taglib  prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<!DOCTYPE html>


<div id="page-body"> 
 
<html:form action="/threadaction.do?forumid=${param.forumid}" >
    
 
    <h3 style="color: white" > Your Thread Title :</h3>  <h1> <html:text   property="title" /></h1> <br> <br> 
      
    <h3 style="color: white" >Select Your Threads To Merge : </h3> 
    <h1> <html:select property="threads" multiple="true" styleId="ss" >
<logic:iterate name="MergeThreadActionForm" id="bean" property="threadobjects"  >
    
    
    <html:option    value="${bean.threadId}" >
                 <bean:write name="bean" property="title"/> 
    </html:option>

   
</logic:iterate>
</html:select>
       
        </h1>
    <br><br>
    <h4> &nbsp;&nbsp;&nbsp; <html:submit property="actionType" value="Execute_Merge"/></h4>
    <br><br>
</html:form>
    

    
    <script type="text/javascript">
        
        function changeVal() {
            
         //   alert('load');
           var  selectBox = document.getElementById("ss");
    
  // alert(selectBox.options.length);

    // is the select box a multiple select box?
        for (var i = 0; i < selectBox.options.length; i++) {
        //   alert(selectBox.options.length);
           selectBox.options[i].selected = true;
            
        }
    
        }
       
    </script>
    
    </div>